<?php
require_once("../../resources/commons.php");
require_once("../../data/Item.php");
require_once("../../data/User.php");
require_once("dashboard_commons.php");

SessionManager::getInstance()->checkSession();
header('Content-type: text/xml; charset=iso-8859-1');

$l_userId=$_REQUEST[ZOOMAREA_ID_PARAMETER];
$l_closeFunction=$_REQUEST[ZOOMAREA_CLOSEFUNC_PARAMETER];

$l_user=User::getFromPrimaryKey(base64_decode($l_userId));
$l_allocatedActions=$l_user->getOpenAllocatedActions();

$l_allocatedActionsTable=new TableData("AllocatedActionsTable");
$l_allocatedActionsTable->addHeader("title","Action");
$l_allocatedActionsTable->addHeader("activityLabel","Activity");
$l_allocatedActionsTable->addHeader("allocated","Allocated");
$l_allocatedActionsTable->addHeader("overdueHtmlFlag","Overdue");
$l_allocatedActionsTable->addAction("addComment");
$l_allocatedActionsTable->addAction("display");
$l_allocatedActionsTable->setRecords($l_allocatedActions);
?>
<p><b>Pending actions</b></p>
<?php
if(count($l_allocatedActions)!=0){
	displayTable($l_allocatedActionsTable);
}else{
	?>
	<div style="color: white;background-color: red;">No actions</div>
	<?php
}
?>
<center>
<br/>
<a href="#" onclick="return <?=$l_closeFunction ?>('<?=$_REQUEST[ZOOMAREA_ID_PARAMETER] ?>');"><img border="0" src="../../resources/images/close.png"/></a>
</center>